import java.util.concurrent.*;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 09 - 20
 * Time: 22:05
 */
public class Test1 {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        ExecutorService pool = Executors.newFixedThreadPool(1);
        Future future = pool.submit(new Runnable() {
            int sum = 0;
            @Override
            public void run() {
                 sum += 2;
            }
        });
        System.out.println(future.get());
    }
}
